package com.link.base.ext.emp.service;

import com.link.base.ext.emp.dao.mybatis.mapper.ExtEmployeeMapper;
import com.link.base.ext.emp.model.ExtEmployee;
import com.link.ext.basic.dao.mapper.BasicExtMapper;
import com.link.ext.basic.service.BasicExtServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


@Service
public class ExtEmployeeServiceImpl extends BasicExtServiceImpl<ExtEmployee> implements ExtEmployeeService {

    @Resource
    private ExtEmployeeMapper extEmployeeMapper;

    @Override
    public BasicExtMapper<ExtEmployee> getBasicMapper() throws Exception {
        // TODO Auto-generated method stub
        return extEmployeeMapper;
    }

    @Override
    @Transactional
    public void updateForESB(ExtEmployee employee) throws Exception {
        extEmployeeMapper.updateEsbData(employee);
    }

    @Override
    public ExtEmployee queryUniqueByShrEmpId(ExtEmployee employee) {
        return extEmployeeMapper.queryUniqueByShrEmpId(employee);
    }

    @Override
    public ExtEmployee queryUniqueByEmpNo(ExtEmployee employee) {
        return extEmployeeMapper.queryUniqueByEmpNo(employee);
    }
}
